<template>
    <el-input placeholder="地区统计:请输入地区名" v-model="Into1.searchName" clearable> </el-input>
       <el-table :data="list_student1" border stripe>
       <el-table-column type="index" label="#"></el-table-column>
        <el-table-column label="学号" prop="Sno">   </el-table-column>
        <el-table-column label="姓名" prop="Sname"></el-table-column>
        <el-table-column label="年龄" prop="Sage"></el-table-column>
        <el-table-column label="性别" prop="Ssex"></el-table-column>
        <el-table-column label="专业" prop="Sdept"></el-table-column>
        <el-table-column label="地区" prop="Sregion"></el-table-column>
        <el-table-column label="学制" prop="Sedu_sys"></el-table-column>
        <el-table-column label="政治面貌" prop="Spolitics"></el-table-column>
        <el-table-column label="民族" prop="Snation"></el-table-column>
      </el-table>
      <div>
          <el-table :data="list_student1" border stripe>
          <el-table-column label="人数" prop="length"></el-table-column>
          </el-table>
           <el-button type="primary" @click="select_sregion">统计该地区学生资料</el-button>
      </div>

      <el-input placeholder="年龄统计:请输入年龄大小" v-model="Into2.searchName" clearable> </el-input>
       <el-table :data="list_student2" border stripe>
       <el-table-column type="index" label="#"></el-table-column>
        <el-table-column label="学号" prop="Sno">   </el-table-column>
        <el-table-column label="姓名" prop="Sname"></el-table-column>
        <el-table-column label="年龄" prop="Sage"></el-table-column>
        <el-table-column label="性别" prop="Ssex"></el-table-column>
        <el-table-column label="专业" prop="Sdept"></el-table-column>
        <el-table-column label="地区" prop="Sregion"></el-table-column>
        <el-table-column label="学制" prop="Sedu_sys"></el-table-column>
        <el-table-column label="政治面貌" prop="Spolitics"></el-table-column>
        <el-table-column label="民族" prop="Snation"></el-table-column>
      </el-table>
      <el-button type="primary" @click="select_sage">统计该年龄学生资料</el-button>

      <el-input placeholder="政治面貌统计:请输入政治面貌" v-model="Into3.searchName" clearable> </el-input>
       <el-table :data="list_student3" border stripe>
       <el-table-column type="index" label="#"></el-table-column>
        <el-table-column label="学号" prop="Sno">   </el-table-column>
        <el-table-column label="姓名" prop="Sname"></el-table-column>
        <el-table-column label="年龄" prop="Sage"></el-table-column>
        <el-table-column label="性别" prop="Ssex"></el-table-column>
        <el-table-column label="专业" prop="Sdept"></el-table-column>
        <el-table-column label="地区" prop="Sregion"></el-table-column>
        <el-table-column label="学制" prop="Sedu_sys"></el-table-column>
        <el-table-column label="政治面貌" prop="Spolitics"></el-table-column>
        <el-table-column label="民族" prop="Snation"></el-table-column>
      </el-table>
      <el-button type="primary" @click="select_spolitics">统计该政治面貌的学生资料</el-button>


</template>

<script>

export default {
    data() {
    return {
        list_student1:[],
        list_student2:[],
        list_student3:[],
      Into1:{
        searchName:"",
        limit :10,
        page:1
      },
      Into2:{
        searchName:"",
        limit :10,
        page:1
      },
      Into3:{
        searchName:"",
        limit :10,
        page:1
      },

    };
  },
 
  methods: {
    async select_sregion() {
      const { data: res} = await this.$http.get("/system/apis/student",{ params: this.Into1});
      this.list_student1 = res.data.value
      console.log(this.list_student1)
    },
    async select_sage() {
      const { data: res} = await this.$http.get("/system/apis/student",{ params: this.Into2});
      this.list_student2 = res.data.value
      console.log(this.list_student2)
    },
    async select_spolitics() {
      const { data: res} = await this.$http.get("/system/apis/student",{ params: this.Into3});
      this.list_student3 = res.data.value
      console.log(this.list_student3)
    },
  }
};
</script>









